// 函数组合要满足结合律
const _ = require('lodash');

//从右到左执行 将结果以此传递给下一个函数
// const f = _.flowRight(_.toUpper, _.first, _.reverse);                //'THREE'
// const f = _.flowRight(_.flowRight( _.toUpper, _.first), _.reverse);  //'THREE'
const f = _.flowRight(_.toUpper, _.flowRight( _.first, _.reverse) );    //'THREE'

console.log(f(['one', 'two', 'three']));